package net.loyintean.pearlshell.validation;

import net.loyintean.pearlshell.validation.config.ValidConfig;

public interface IValidRuleConfig {

	final IValidRuleConfig OBJ_NOT_NULL = new ValidConfig("OBJ_NOT_NULL");

	final IValidRuleConfig STRING_ALL_CHINESE = new ValidConfig(
			"STRING_ALL_CHINESE");

	final IValidRuleConfig STRING_IS_FLOAT = new ValidConfig("STRING_IS_FLOAT");

	final IValidRuleConfig STRING_IS_INT = new ValidConfig("STRING_IS_INT");

	/**
	 * whether the string is longer than max length.
	 * <p>
	 * the eg of how to use this rule, @see
	 * {@link net.loyintean.pearlshell.validation.rule.StringMaxLengthTest}
	 * 
	 */
	final IValidRuleConfig STRING_MAX_LENGTH = new ValidConfig(
			"STRING_MAX_LENGTH");

	final IValidRuleConfig STRING_MIN_LENGTH = new ValidConfig(
			"STRING_MIN_LENGTH");

	final IValidRuleConfig STRING_NOT_BLANK = new ValidConfig(
			"STRING_NOT_BLANK");

	final IValidRuleConfig STRING_WITHOUT_CHINESE = new ValidConfig(
			"STRING_WITHOUT_CHINESE");

	// 2014-7-9 from林俊 to辰明 blank line tart
	// CLOSE blank line is better in format
	// 2014-7-9 from林俊 to辰明 blank line end
	final IValidRuleConfig STRING_IS_PHONENUM = new ValidConfig(
			"STRING_PHONE_NUM");

	// 2014-7-9 from林俊 to辰明 comment the rule start
	// DONE use javadoc to explain what the valid rule is. as there might be
	// serial rules for identify card, it's neccessary to tell user the rule
	// exactly.
	// 2014-7-9 from林俊 to辰明 comment the rule end
	final IValidRuleConfig STRING_IS_IDNUM = new ValidConfig(
			"STRING_IDENTIFY_CARD");

	/**
	 * config to valid whether the string is email.<br>
	 * email校验所需的配置。
	 * <p>
	 * the toValid Object must be String. need no other input parameters. <br>
	 * 被校验对象必须是字符串。不需要额外的入参。
	 * 
	 * @see {@link net.loyintean.pearlshell.validation.rule.StringIsEmailValidRuleImpl}
	 * 
	 */
	final IValidRuleConfig STRING_IS_EMAIL = new ValidConfig("STRING_IS_EMAIL");

	String ruleName();

	Object[] validParam();
}
